import numpy as np

def generate_floats():
    total_count = 7916
    
    # 生成 -100 到 100 之间的随机浮点数
    all_floats = np.random.uniform(-100, 100, total_count)
    
    # 保存为逗号分隔
    with open("random_floats_-100_100.txt", "w") as f:
        f.write(",".join(map(str, all_floats)))
    
    print(f"生成完成: random_floats_-100_100.txt")
    print(f"数据范围: {all_floats.min():.2f} 到 {all_floats.max():.2f}")
    print(f"前5个示例: {all_floats[:5]}")
    return all_floats

generate_floats()
